home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / C++ / Applications / PICSee Dust 1.01 / Quaternary Source / AlphaChannel.h < prev    next >
Text File  |  1995-11-23  |  998b  |  44 lines

  1. #ifndef ALPHACHANNEL_H_
  2. #define ALPHACHANNEL_H_
  3.  
  4. #ifndef __QDOFFSCREEN__
  5. #include <QDOffscreen.h>
  6. #endif
  7.  
  8.  
  9. typedef struct {
  10.     unsigned char alpha;
  11.     unsigned char red;
  12.     unsigned char green;
  13.     unsigned char blue;
  14. } ThirtyTwoBitPixel, *ThirtyTwoBitPixelPtr;
  15.  
  16. typedef void (*AlphaPixelFilterProc)(ThirtyTwoBitPixelPtr pixel);
  17.  
  18. // ---------------------------------------------------------------------------
  19.  
  20. Boolean HasPossibleAlphaChannel(GWorldPtr buffer);
  21.  
  22. /*
  23.     SplitAlphaChannel() works on the entire gworld, and directly accesses
  24.     the pixel map data therein.
  25.  
  26.     <srcBuffer> must be a 32-bit offscreen gworld
  27.     <imageBuffer> may be:
  28.         - 32-bit offscreen gworld, or
  29.         - same gworld as <srcBuffer>, or
  30.         - NULL
  31.     <alphaBuffer> may be:
  32.         - 8-bit offscreen gworld, or
  33.         - NULL
  34.     <pixelProc> may be:
  35.         - address of your pixel filtering proc, or
  36.         - NULL
  37. */
  38. void SplitAlphaChannel(
  39.     GWorldPtr srcBuffer,
  40.     GWorldPtr imageBuffer,
  41.     GWorldPtr alphaBuffer,
  42.     AlphaPixelFilterProc pixelProc);
  43.  
  44. #endif // ALPHACHANNEL_H_